<!DOCTYPE html>
<html lang="zh_Ch">
    <head>
  <!-- 元数据 -->
  <meta charset="utf-8">
  
  
  <title>分类: Js | Blog</title>
  
  <meta name="author" content="Sun Liusen" />
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="robots" content="index,follow" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <meta name="format-detection" content="telphone=no, email=no" />
  
    <meta name="keywords" content="" />
  
  <meta name="description" content="孙刘森的博客">
<meta property="og:type" content="website">
<meta property="og:title" content="分类: Js">
<meta property="og:url" content="https://slsandxr.top/categories/Js/index.html">
<meta property="og:site_name" content="Blog">
<meta property="og:description" content="孙刘森的博客">
<meta property="og:locale" content="zh_CH">
<meta property="article:author" content="Sun Liusen">
<meta name="twitter:card" content="summary">
  
  <!-- 站点验证相关 -->
  
    
    
    
  
  <!-- 样式表文件 -->
  <link rel="stylesheet" id="kratos-css" href="/css/kratosr.min.css" media="all"></script>
  
    <link rel="stylesheet" id="darkmode-css" href="/css/kr-color-dark.min.css" media="(prefers-color-scheme: dark)"></script>
    <script src="/js/kr-dark.min.js"></script>
  
  
    <link rel="stylesheet" id="highlight-css" href="/css/highlight/night-eighties.min.css" media="all"></script>
  
  <link rel="stylesheet" id="fontawe-css" href="/vendors/font-awesome@4.7.0/css/font-awesome.min.css" media="all"></script>
  <link rel="stylesheet" id="nprogress-css" href="/vendors/nprogress@0.2.0/nprogress.css" media="all"></script>
  
  
    <link rel="stylesheet" href="/vendors/aplayer@1.10.1/dist/APlayer.min.css"></script>
  
  
    <link rel="stylesheet" href="/vendors/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css"></script>
  
  <!-- 不得不预先加载的一些JS文件 -->
  <script src="/vendors/jquery@3.6.0/dist/jquery.min.js"></script>
  
    <script src="/vendors/qrcode_js@1.0.0/qrcode.min.js"></script>
  
  
  <style>
    
    
  </style>
  
<meta name="generator" content="Hexo 6.3.0"></head>


    <body class="custom-background">
        <div id="kratos-wrapper">
    <div id="kratos-page">
        <div id="kratos-header">
            <header id="kratos-desktop-topnav" class="kratos-topnav">
                <div class="container">
                    <div class="nav-header">
                        <nav id="kratos-menu-wrap">
                            <ul id="kratos-primary-menu" class="sf-menu">
                                
                                    
                                    
                                
                            </ul>
                        </nav>
                    </div>
                </div>
            </header>
            <header id="kratos-mobile-topnav" class="kratos-topnav">
                <div class="container">
                    <div class="color-logo"><a href="/">Blog</a></div>
                    <div class="nav-toggle">
                        <a class="kratos-nav-toggle js-kratos-nav-toggle">
                            <i></i>
                        </a>
                    </div>
                </div>
            </header>
        </div>
        <div class="kratos-start kratos-hero-2">
            <!-- <div class="kratos-overlay"></div> -->
            <div class="kratos-cover kratos-cover-2 text-center">
                <div class="desc desc2 animate-box">
                    <a href="/">
                        <h2>Blog</h2> <br />
                        <span></span>
                    </a>
                </div>
            </div>
        </div>

        <div id="kratos-blog-post">
            <div class="container">
                <div id="main" class="row">
                    

        

            <section class="col-md-8">

        

            <!-- Breadcrumb for tag & category page -->

    <article class="kratos-hentry kratos-entry-border-new clearfix">
        <div class="kratos-breadcrumb">
            <a href="/">
                <i class="fa fa-home"></i>
            </a>
            <i class="fa fa-angle-right"></i>
            

                <a href="/categories/">
                    分类
                </a>

                
                
                    <i class="fa fa-angle-right"></i>
                    <a href="/categories/Js/">
                        Js
                    </a>
                
            
            
        </div>
    </article>




    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2024/06/06/JS/%E9%80%82%E9%85%8D%E4%BB%A3%E7%A0%81/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2024/06/06/JS/%E9%80%82%E9%85%8D%E4%BB%A3%E7%A0%81/" itemprop="mainEntityOfPage"><span itemprop="name headline">前端rem适配代码</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                代码片段
参数


名称
描述
值



designWidth
当前设计稿的宽度
Number


minDesignWidth
适配屏幕的最小宽度
Number


stopWidth
停止缩放宽度
Number




1234...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2024-06-06T05:33:10.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2024-06-06</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E9%80%82%E9%85%8D/" rel="tag">适配</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2024/06/06/JS/%E9%80%82%E9%85%8D%E4%BB%A3%E7%A0%81/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/10/07/JS/canvas%E5%AE%9E%E7%8E%B0%E7%9B%96%E7%AB%A0/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/10/07/JS/canvas%E5%AE%9E%E7%8E%B0%E7%9B%96%E7%AB%A0/" itemprop="mainEntityOfPage"><span itemprop="name headline">canvas实现盖章</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                代码片段12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-10-07T08:21:44.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-10-07</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/10/07/JS/canvas%E5%AE%9E%E7%8E%B0%E7%9B%96%E7%AB%A0/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/08/31/JS/Js-sku%E5%95%86%E5%93%81%E8%A7%84%E5%88%99/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/08/31/JS/Js-sku%E5%95%86%E5%93%81%E8%A7%84%E5%88%99/" itemprop="mainEntityOfPage"><span itemprop="name headline">Js-sku商品规则</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                Js代码片段123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-08-31T07:08:19.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-08-31</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/08/31/JS/Js-sku%E5%95%86%E5%93%81%E8%A7%84%E5%88%99/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/07/25/JS/Js%E5%AE%9E%E7%8E%B0%E8%A7%A3%E6%9E%90gif%E5%8A%A8%E5%9B%BE%E5%92%8C%E5%90%88%E6%88%90gif%E5%8A%A8%E5%9B%BE/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/07/25/JS/Js%E5%AE%9E%E7%8E%B0%E8%A7%A3%E6%9E%90gif%E5%8A%A8%E5%9B%BE%E5%92%8C%E5%90%88%E6%88%90gif%E5%8A%A8%E5%9B%BE/" itemprop="mainEntityOfPage"><span itemprop="name headline">Js实现解析gif动图和合成gif动图</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                码云地址：点击此处跳转
代码片段12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-07-25T07:10:10.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-07-25</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/07/25/JS/Js%E5%AE%9E%E7%8E%B0%E8%A7%A3%E6%9E%90gif%E5%8A%A8%E5%9B%BE%E5%92%8C%E5%90%88%E6%88%90gif%E5%8A%A8%E5%9B%BE/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/07/10/JS/M3u8%E8%A7%86%E9%A2%91%E6%92%AD%E6%94%BE/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/07/10/JS/M3u8%E8%A7%86%E9%A2%91%E6%92%AD%E6%94%BE/" itemprop="mainEntityOfPage"><span itemprop="name headline">M3u8视频播放</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                代码下载代码Dome: 压缩文件下载

                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-07-10T03:59:06.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-07-10</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/07/10/JS/M3u8%E8%A7%86%E9%A2%91%E6%92%AD%E6%94%BE/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/06/30/html%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/06/30/html%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F/" itemprop="mainEntityOfPage"><span itemprop="name headline">html拖拽排序</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-06-30T07:07:20.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-06-30</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/06/30/html%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/06/06/JS/%E5%9C%A8%E7%BA%BF%E5%9B%BE%E7%89%87%E8%BD%ACsvg%E9%99%84%E6%BA%90%E7%A0%81/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/06/06/JS/%E5%9C%A8%E7%BA%BF%E5%9B%BE%E7%89%87%E8%BD%ACsvg%E9%99%84%E6%BA%90%E7%A0%81/" itemprop="mainEntityOfPage"><span itemprop="name headline">在线图片转svg附源码</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                
const base64ToFile = () =>{
    let base64 = `data:text/html;base64,PCFET0NUWVBFIGh0bWw+DQo8aHRtbCBsYW5nPSJlbiI+DQoJ...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-06-06T08:43:26.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-06-06</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%B7%A5%E5%85%B7/" rel="tag">工具</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/06/06/JS/%E5%9C%A8%E7%BA%BF%E5%9B%BE%E7%89%87%E8%BD%ACsvg%E9%99%84%E6%BA%90%E7%A0%81/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/03/28/JS/JS%E5%B8%B8%E7%94%A8/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/03/28/JS/JS%E5%B8%B8%E7%94%A8/" itemprop="mainEntityOfPage"><span itemprop="name headline">JS常用</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                正则
去掉字符串里的html123let reg = /(&lt;([^&gt;]+)&gt;)/ig;let str = &quot;&lt;p&gt;看一下内容&lt;/p&gt;&quot;;console.log(str.re...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-03-28T10:26:14.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-03-28</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/03/28/JS/JS%E5%B8%B8%E7%94%A8/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/02/10/vue%E7%A7%BB%E5%8A%A8%E7%AB%AF%E6%BB%91%E5%8A%A8%E5%88%B0%E5%BA%95%E9%83%A8/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/02/10/vue%E7%A7%BB%E5%8A%A8%E7%AB%AF%E6%BB%91%E5%8A%A8%E5%88%B0%E5%BA%95%E9%83%A8/" itemprop="mainEntityOfPage"><span itemprop="name headline">vue移动端滑动到底部</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                滚动到底部1234567 let scrollHeight = this.$refs.dialogCountent.scrollHeight; let clientHeight = this.$refs.dialogCountent....
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-02-10T09:07:37.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-02-10</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/02/10/vue%E7%A7%BB%E5%8A%A8%E7%AB%AF%E6%BB%91%E5%8A%A8%E5%88%B0%E5%BA%95%E9%83%A8/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    

    
    
        <article class="kratos-hentry clearfix" itemscope itemtype="https://schema.org/Article">
            <div class="kratos-entry-border-new clearfix">
                
                <div class="kratos-entry-thumb-new">
                    <a href="/2023/02/07/js%E6%96%87%E4%BB%B6%E7%94%9F%E6%88%90%E5%92%8C%E8%A7%A3%E6%9E%90/">
                        
                            <img class="kratos-entry-thumb-new-img" alt="">
                        
                    </a>
                </div>
                <div class="kratos-post-inner-new">
                    <header class="kratos-entry-header-new">
                            <a class="label-link" href="/categories/Js/">Js</a>
                        <h2 class="kratos-entry-title-new"><a href="/2023/02/07/js%E6%96%87%E4%BB%B6%E7%94%9F%E6%88%90%E5%92%8C%E8%A7%A3%E6%9E%90/" itemprop="mainEntityOfPage"><span itemprop="name headline">js文件生成和解析</span></a>
                    </header>
                    <div class="kratos-entry-content-new">
                        <p itemProp="description">
                            
                                创建实例TEXT_FILE_TOOLS 如 new TEXT_FILE_TOOLS()会返回三个参数通过Promise将encodeFile和decodeFile



参数
介绍
传参



encodeFile
加密后生成文件，并...
                            
                        </p>
                    </div>
                </div>
                <footer class="kratos-post-meta-new">
                    <span class="pull-left">
                        <time datetime="2023-02-07T10:03:15.000Z" itemprop="datePublished">
                            <a><i class="fa fa-calendar"></i> 2023-02-07</a>
                        </time>
                        <a>
                            
                                <i class="fa fa-tags"></i>
                                <a class="tag-none-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a>
                            
                        </a>
                        
                            <!-- 当前仅支持valine/waline自带的统计功能 -->
                            
                        
                        
                            <!-- 当前仅支持waline自带的统计功能 -->
                            
                        
                    </span>
                    <span class="pull-right">
                        <a class="read-more" href="/2023/02/07/js%E6%96%87%E4%BB%B6%E7%94%9F%E6%88%90%E5%92%8C%E8%A7%A3%E6%9E%90/" title="阅读全文">阅读全文<i class="fa fa-chevron-circle-right"></i></a>
                    </span>
                </footer>
            </div>
        </article>
    



    <div class='text-center pagination'>
    <span class="page-number current">1</span><a class="page-number" href="/categories/Js/page/2/">2</a><a class="extend next" rel="next" href="/categories/Js/page/2/"><i class="fa fa-angle-right"></i></a>
    </div>



    <div class="hidden">
        <!-- 加载文章阅读对应的统计功能，评论自带的那种 -->
        
    </div>



        

            </section>

        

                
            

<section id="kratos-widget-area" class="col-md-4 hidden-xs hidden-sm">
    <!-- 文章和页面根据splitter来分割，没有的话就从头开始设置为sticky -->
    
        <div class="sticky-area">
    
    
                <aside id="krw-about" class="widget widget-kratos-about clearfix">
    <div class="photo-background"></div>
    <div class="photo-wrapper clearfix">
        <div class="photo-wrapper-tip text-center">
            <img class="about-photo" src="/images/avatar.webp" loading="lazy" decoding="auto" />
        </div>
    </div>
    <div class="textwidget">
        <p class="text-center">孙刘森的博客</p>
    </div>
    <div class="site-meta">
        <a class="meta-item" href="/archives/">
            <span class="title">
                文章
            </span>
            <span class="count">
                34
            </span>
        </a>
        <a class="meta-item" href="/categories/">
            <span class="title">
                分类
            </span>
            <span class="count">
                11
            </span>
        </a>
        <a class="meta-item" href="/tags/">
            <span class="title">
                标签
            </span>
            <span class="count">
                18
            </span>
        </a>
    </div>
</aside>
            
                
  <aside id="krw-categories" class="widget widget-kratos-categories clearfix">
    <h4 class="widget-title"><i class="fa fa-folder"></i>分类目录</h4>
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Js/">Js</a><span class="category-list-count">12</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/PETS-3/">PETS-3</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tools/">Tools</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/UniCloud/">UniCloud</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%AD%99%E5%88%98%E6%A3%AE%E7%9A%84%E8%B4%A6%E6%9C%AC/">孙刘森的账本</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%AE%89%E5%8D%93/">安卓</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/">微信小程序</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%88%91%E7%9A%84%E5%8D%9A%E5%AE%A2/">我的博客</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%8E%92%E5%BF%A7%E8%A7%A3%E9%9A%BE/">排忧解难</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%9C%8D%E5%8A%A1%E5%99%A8/">服务器</a><span class="category-list-count">12</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E7%A7%8D%E5%AD%90/">种子</a><span class="category-list-count">1</span></li></ul>
  </aside>


            
                
  <aside id="krw-tags" class="widget widget-kratos-tags clearfix">
    <h4 class="widget-title"><i class="fa fa-tags"></i>标签聚合</h4>
      <div class="tag-clouds">
        <a href="/tags/Docker/" style="font-size: 0.6em;">Docker</a> <a href="/tags/Java/" style="font-size: 0.6em;">Java</a> <a href="/tags/Linux/" style="font-size: 0.73em;">Linux</a> <a href="/tags/Mindway-js/" style="font-size: 0.6em;">Mindway.js</a> <a href="/tags/Mysql/" style="font-size: 0.6em;">Mysql</a> <a href="/tags/Nginx/" style="font-size: 0.67em;">Nginx</a> <a href="/tags/Node/" style="font-size: 0.6em;">Node</a> <a href="/tags/PETS-3/" style="font-size: 0.6em;">PETS-3</a> <a href="/tags/UniCloud/" style="font-size: 0.6em;">UniCloud</a> <a href="/tags/Vue3/" style="font-size: 0.6em;">Vue3</a> <a href="/tags/apk/" style="font-size: 0.6em;">apk</a> <a href="/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 0.8em;">前端</a> <a href="/tags/%E5%89%8D%E7%AB%AF%E5%AD%98%E5%82%A8/" style="font-size: 0.6em;">前端存储</a> <a href="/tags/%E5%AD%99%E5%88%98%E6%A3%AE%E7%9A%84%E8%B4%A6%E6%9C%AC/" style="font-size: 0.6em;">孙刘森的账本</a> <a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size: 0.67em;">工具</a> <a href="/tags/%E6%8E%92%E5%BF%A7%E8%A7%A3%E9%9A%BE/" style="font-size: 0.6em;">排忧解难</a> <a href="/tags/%E7%A7%8D%E5%AD%90/" style="font-size: 0.6em;">种子</a> <a href="/tags/%E9%80%82%E9%85%8D/" style="font-size: 0.6em;">适配</a>
      </div>
  </aside>

            
                
  <aside id="krw-posts" class="widget widget-kratos-posts">
  <h4 class="widget-title"><i class="fa fa-file"></i>最新文章</h4>
  <div class="tab-content">
      <ul class="list-group">
        
        
          
          
            <a class="list-group-item" href="/2024/06/06/JS/%E9%80%82%E9%85%8D%E4%BB%A3%E7%A0%81/"><i class="fa  fa-book"></i> 前端rem适配代码</a>
            
          
        
          
          
            <a class="list-group-item" href="/2023/10/07/JS/canvas%E5%AE%9E%E7%8E%B0%E7%9B%96%E7%AB%A0/"><i class="fa  fa-book"></i> canvas实现盖章</a>
            
          
        
          
          
            <a class="list-group-item" href="/2023/08/31/JS/Js-sku%E5%95%86%E5%93%81%E8%A7%84%E5%88%99/"><i class="fa  fa-book"></i> Js-sku商品规则</a>
            
          
        
          
          
            <a class="list-group-item" href="/2023/07/28/%E6%8E%92%E5%BF%A7%E8%A7%A3%E9%9A%BE/"><i class="fa  fa-book"></i> 排忧解难</a>
            
          
        
          
          
            <a class="list-group-item" href="/2023/07/25/JS/Js%E5%AE%9E%E7%8E%B0%E8%A7%A3%E6%9E%90gif%E5%8A%A8%E5%9B%BE%E5%92%8C%E5%90%88%E6%88%90gif%E5%8A%A8%E5%9B%BE/"><i class="fa  fa-book"></i> Js实现解析gif动图和合成gif动图</a>
            
          
        
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
      </ul>
  </div>
  </aside>

            
    </div>
</section>
        
        </div>
    </div>
</div>
<footer>
    <div id="footer"  class="ap-lrc"  >
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-md-offset-3 footer-list text-center">
                    <ul class="kratos-social-icons">
                        <!-- Keep for compatibility -->
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        <!-- New links -->
                        
                    </ul>
                    <ul class="kratos-copyright">
                        <div>
                            <li>&copy; 2024 Blog 版权所有.</li>
                            <li>本站已运行<span id="span_dt">Loading...</span></li>
                        </div>
                        <div>
                            <li>Theme <a href="https://github.com/Candinya/Kratos-Rebirth" target="_blank">Kratos:Rebirth</a></li>
                            <li>Site built with&nbsp;<i class="fa fa-heart throb" style="color:#d43f57"></i>&nbsp;by Sun Liusen.</li>
                        </div>
                        <div>
                            <li>Powered by <a href="https://hexo.io" target="_blank" rel="nofollow">Hexo</a></li>
                            <li>Hosted on <a href="https://github.io" target="_blank">Github Pages</a></li>
                        </div>
                        <div>
                            
                            
                        </div>
                    </ul>
                </div>
            </div>
        </div>
        <div class="kr-tool text-center">
            <div class="tool">
                
                    <div class="box search-box">
                        <a href="/search/">
                            <span class="fa fa-search"></span>
                        </a>
                    </div>
                
                
                    <div class="box theme-box" id="darkmode-switch">
                        <span class="fa fa-adjust"></span>
                    </div>
                
                
                
            </div>
            <div class="box gotop-box">
                <span class="fa fa-chevron-up"></span>
            </div>
        </div>
    </div>
</footer>
</div>
</div>

        <script defer src="/vendors/bootstrap@3.3.4/dist/js/bootstrap.min.js"></script>
<script defer src="/vendors/nprogress@0.2.0/nprogress.js"></script>
<script>
    if (!window.kr) {
        window.kr = {};
    }
    window.kr.notMobile = (!(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)));
    window.kr.siteRoot = "/";
</script>


    <script async src="/js/candy.min.js"></script>



    <script defer src="/vendors/aplayer@1.10.1/dist/APlayer.min.js"></script>
    
    <script defer src="/vendors/meting@2.0.1/dist/Meting.min.js"></script>
    <meting-js
        server="netease"
        type="playlist"
        id="3204190542"
        order="random"
        fixed="true"
    >
    </meting-js>



    <script defer src="/vendors/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>

<script defer src="/js/kratosr.min.js"></script>
<script defer src="/js/pjax.min.js"></script>



<!-- Extra support for third-party plguins  -->


    </body>
</html>